﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class ModifyPasswd : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void OKButton_Click(object sender, EventArgs e)
    {
        ////用户名
        //string usernm = this.Session[SessionType.UserName].ToString().Trim();

        //if (this.txtNew.Text.Trim() == "")
        //{
        //    Function.ShowMessageBox(this, "新密码不能为空！");
        //}
        //else 
        //{
        //    if (this.txtNew.Text.Trim() != this.txtConfirm.Text.Trim())
        //    {
        //        Function.ShowMessageBox(this, "两次密码不相同！");
        //    }
        //    else
        //    {
        //        string sql = "UPDATE USERTB SET PASSWORD = '" + this.txtConfirm.Text.Trim() + "' WHERE USERID = '" + usernm + "'";

        //        SqlConnection con = new SqlConnection(Model.DataBaseConnectString.ConnWeb);
        //        con.Open();

        //        SqlCommand cmd = new SqlCommand(sql, con);
        //        if (cmd.ExecuteNonQuery() == 1)
        //        {
        //            Function.ShowMessageBox(this, "修改成功！");
        //        }
        //        else
        //        {
        //            Function.ShowMessageBox(this, "修改失败！");
        //        }

        //        con.Close();
        //        con.Dispose();
        //        cmd.Dispose();
        //    }
        //}
    }
}